package com.alageek.study.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class HelloController {

    @GetMapping("/login_page")
    public String loginPage(){
        return "login_page";
    }

    @ResponseBody
    @GetMapping("/admin/hello")
    public String adminHello(){
        return "hello admin";
    }

    @ResponseBody
    @GetMapping("/user/hello")
    public String userHello(){
        return "hello user";
    }

    @ResponseBody
    @GetMapping("/db/hello")
    public String dbaHello(){
        return "hello dba";
    }

    @ResponseBody
    @GetMapping("/hello")
    public String hello(){
        return "hello";
    }

}
